From 8e84e3f524cf888de8412b939b8117418167f0a4 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 31 Jan 2007 10:25:12 +0000 Subject: [PATCH] [TOOLS] Fix foreign header build breakage. Having both the Xen tree and the tools tree recurse into the foreign headers directory causes headaches in parallel builds and when building 32-bit tools + 64 bit Xen in the same tree. Therefore we cause mk-symlinks to symlink in the foreign headers build bits and generate a local version of the headers and checker tool. Only libxc needs to do this since the other tools were actually picking up the libxc version of the headers anyway so the mk-symlinks calls can be removed from these components. Signed-off-by: Ian Campbell --- tools/Rules.mk | 12 ++++++------ tools/blktap/Makefile | 4 ++-- tools/security/Makefile | 3 +-- tools/xenfb/Makefile | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 6c8049bc10..af530ac65d 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -32,7 +32,7 @@ CFLAGS += $(CFLAGS-y) %.o: %.cc $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< -.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS) mk-foreign-headers +.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS) mk-symlinks-SunOS: @@ -43,7 +43,7 @@ mk-symlinks-Linux: ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . ) ( cd xen && rm -f sys && ln -sf linux sys ) -mk-symlinks-xen: mk-foreign-headers +mk-symlinks-xen: mkdir -p xen ( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . ) mkdir -p xen/hvm @@ -53,9 +53,9 @@ mk-symlinks-xen: mk-foreign-headers mkdir -p xen/arch-x86 ( cd xen/arch-x86 && ln -sf ../../$(XEN_ROOT)/xen/include/public/arch-x86/*.h . ) mkdir -p xen/foreign - ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.h . ) - -mk-foreign-headers: - make -C $(XEN_ROOT)/xen/include/public/foreign + ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/Makefile . ) + ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/reference.size . ) + ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.py . ) + make -C xen/foreign mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS) diff --git a/tools/blktap/Makefile b/tools/blktap/Makefile index fb194f3203..671c4f4b87 100644 --- a/tools/blktap/Makefile +++ b/tools/blktap/Makefile @@ -9,7 +9,7 @@ SUBDIRS-y += drivers all: build .PHONY: build -build: mk-symlinks +build: @set -e; for subdir in $(SUBDIRS-y); do \ $(MAKE) -C $$subdir all; \ done @@ -22,7 +22,7 @@ install: .PHONY: clean clean: - rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS + rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) TAGS @set -e; for subdir in $(SUBDIRS-y); do \ $(MAKE) -C $$subdir clean; \ done diff --git a/tools/security/Makefile b/tools/security/Makefile index cd0835a910..d29a1926bb 100644 --- a/tools/security/Makefile +++ b/tools/security/Makefile @@ -86,7 +86,7 @@ install: endif .PHONY: build -build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS) +build: $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS) python python/setup.py build chmod 700 $(ACM_SCRIPTS) @@ -104,7 +104,6 @@ clean: $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS) $(RM) $(ACM_OBJS) $(RM) $(PROG_DEPS) - $(RM) -r xen $(RM) -r build .PHONY: mrproper diff --git a/tools/xenfb/Makefile b/tools/xenfb/Makefile index e7c76e73b5..b9bd3ba1e6 100644 --- a/tools/xenfb/Makefile +++ b/tools/xenfb/Makefile @@ -12,7 +12,7 @@ INSTALL_DIR = $(INSTALL) -d -m0755 all: build .PHONY: build -build: mk-symlinks +build: $(MAKE) vncfb sdlfb install: all -- 2.30.2